<template>
	<div class="child">
		<h1>我是Child组件</h1>
		<h3>爹给我的车：{{car}}</h3>
	</div>
</template>

<script>
	export default {
		name:'Child',
		props:['car'],
		data() {
			return {
				computer:'华硕'
			}
		},
		mounted(){
			setTimeout(()=>{
				this.$emit('haha',this.computer)
			})
		}
	}
</script>

<style>
	.child{
		background-color: skyblue;
		padding: 20px;
	}
</style>